from interface.Event import Event


class EventCase:
    def __init__(self):
        self.event = Event()

    def test_add_event(self):
        # 准备测试数据
        payload = {
            "eid": "125",
            "name": "黑米10s",
            "limit": "40",
            "status": "1",
            "address": "一个教室",
            "start_time": "2022-07-31"
        }
        result = self.event.add_event(payload)
        print(result)
    
    def test_get_event(self):
        params = {
              
        }
# 断言返回码
        status = result.get("body").get("status")
        print(status)
        assert status == 10200

        # 断言提示信息
        message = result.get("body").get("message")
        print(message)
        assert  message == "add event success"


if __name__ == '__main__':
    EventCase().test_add_event()
